package com.person.cloud.controller;

import com.person.cloud.feign.client.GoodsFeignClient;
import com.person.common.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zhangfc
 * @date 2021/7/26 21:49
 */
@RestController
public class FeignGoodsController {

    @Resource
    GoodsFeignClient goodsFeignClient;

    @GetMapping("/feigngoods/{id}")
    public CommonResult feignGoods(@PathVariable("id")Long id){
        return goodsFeignClient.getGoods();
    }
}
